[binray incompatibility]
authorTim Janik <timj@gtk.org>
Fri, 15 May 1998 08:09:18 +0000 (08:09 +0000)
committerTim Janik <timj@src.gnome.org>
Fri, 15 May 1998 08:09:18 +0000 (08:09 +0000)
[binray incompatibility]

Fri May 15 00:56:59 1998  Tim Janik  <timj@gtk.org>

        * glib.h: further support for gcc function attributes: G_GNUC_FORMAT,
        G_GNUC_NORETURN and G_GNUC_CONST.

        * gscanner.c (g_scanner_stat_mode): changed stat() to lstat().
        (g_scanner_msg_handler): "\n" at end of line!
        (g_scanner_foreach_symbol): new function to iterate over the symbol
        table (GScanner does value-wrapping).

Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
        the visibility_notify_event method and changed method order.

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/ChangeLog
glib/glib.h
glib/gscanner.c
gtk/gtkwidget.c
gtk/gtkwidget.h

index 8cb0e554d056be630f4476f8d8f3181768bb2a57..372e6db51265a7aeabe47e9f93363574b48b3899 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
+       the visibility_notify_event method and changed method order.
+
 Thu May 14 03:04:43 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtk.defs: added GtkButtonBoxStyle and GtkOrientation definitions
index 8cb0e554d056be630f4476f8d8f3181768bb2a57..372e6db51265a7aeabe47e9f93363574b48b3899 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
+       the visibility_notify_event method and changed method order.
+
 Thu May 14 03:04:43 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtk.defs: added GtkButtonBoxStyle and GtkOrientation definitions
index 8cb0e554d056be630f4476f8d8f3181768bb2a57..372e6db51265a7aeabe47e9f93363574b48b3899 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
+       the visibility_notify_event method and changed method order.
+
 Thu May 14 03:04:43 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtk.defs: added GtkButtonBoxStyle and GtkOrientation definitions
index 8cb0e554d056be630f4476f8d8f3181768bb2a57..372e6db51265a7aeabe47e9f93363574b48b3899 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
+       the visibility_notify_event method and changed method order.
+
 Thu May 14 03:04:43 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtk.defs: added GtkButtonBoxStyle and GtkOrientation definitions
index 8cb0e554d056be630f4476f8d8f3181768bb2a57..372e6db51265a7aeabe47e9f93363574b48b3899 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
+       the visibility_notify_event method and changed method order.
+
 Thu May 14 03:04:43 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtk.defs: added GtkButtonBoxStyle and GtkOrientation definitions
index 8cb0e554d056be630f4476f8d8f3181768bb2a57..372e6db51265a7aeabe47e9f93363574b48b3899 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
+       the visibility_notify_event method and changed method order.
+
 Thu May 14 03:04:43 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtk.defs: added GtkButtonBoxStyle and GtkOrientation definitions
index 8cb0e554d056be630f4476f8d8f3181768bb2a57..372e6db51265a7aeabe47e9f93363574b48b3899 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 15 09:44:10 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
+       the visibility_notify_event method and changed method order.
+
 Thu May 14 03:04:43 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtk.defs: added GtkButtonBoxStyle and GtkOrientation definitions
index 8f0252d490d9adb41002d4168bfb432c4436ea0b..71515d005d4f62eb6c54af5d650e6f20e899a93b 100644 (file)
@@ -1,3 +1,13 @@
+Fri May 15 00:56:59 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: further support for gcc function attributes: G_GNUC_FORMAT,
+       G_GNUC_NORETURN and G_GNUC_CONST.
+
+       * gscanner.c (g_scanner_stat_mode): changed stat() to lstat().
+       (g_scanner_msg_handler): "\n" at end of line!
+       (g_scanner_foreach_symbol): new function to iterate over the symbol
+       table (GScanner does value-wrapping).
+
 Thu May 14 04:14:12 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h: typedef gint gboolean;
index 5bf282f5d7caa92af4aec26125f9c6fcb0cc828d..653affcbfa4e4bbb5a63d9f9397e76827c2c9404 100644 (file)
 #  endif
 #endif
 
-/* Provide macros to feature the GCC printf format function attribute.
+/* Provide macros to feature GCC function attributes.
  */
 #if    __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
 #define G_GNUC_PRINTF( format_idx, arg_idx )   \
   __attribute__((format (printf, format_idx, arg_idx)))
 #define G_GNUC_SCANF( format_idx, arg_idx )    \
   __attribute__((format (scanf, format_idx, arg_idx)))
+#define G_GNUC_FORMAT( arg_idx )               \
+  __attribute__((format_arg (arg_idx)))
+#define        G_GNUC_NORETURN                         \
+  __attribute__((noreturn))
+#define        G_GNUC_CONST                            \
+  __attribute__((const))
 #else   /* !__GNUC__ */
 #define G_GNUC_PRINTF( format_idx, arg_idx )
 #define G_GNUC_SCANF( format_idx, arg_idx )
+#define        G_GNUC_FORMAT( arg_idx )
+#define        G_GNUC_NORETURN
+#define        G_GNUC_CONST
 #endif  /* !__GNUC__ */
 
 /* Wrap the __PRETTY_FUNCTION__ and __FUNCTION__ variables with macros,
@@ -706,7 +715,7 @@ gdouble g_timer_elapsed (GTimer      *timer,
 
 /* Output
  */
-void g_error   (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
+void g_error   (const gchar *format, ...) G_GNUC_PRINTF (1, 2) G_GNUC_NORETURN;
 void g_warning (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
 void g_message (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
 void g_print   (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
@@ -1031,6 +1040,9 @@ void              g_scanner_add_symbol            (GScanner       *scanner,
                                                 gpointer       value);
 gpointer       g_scanner_lookup_symbol         (GScanner       *scanner,
                                                 const gchar    *symbol);
+void           g_scanner_foreach_symbol        (GScanner       *scanner,
+                                                GHFunc          func,
+                                                gpointer        func_data);
 void           g_scanner_remove_symbol         (GScanner       *scanner,
                                                 const gchar    *symbol);
 void           g_scanner_unexp_token           (GScanner       *scanner,
index 73f4a0e6bb3858092a1195a8573701032ca620f6..7485f8f7d85553ddd39945bb6dee85885b714f61 100644 (file)
@@ -243,7 +243,7 @@ g_scanner_msg_handler (GScanner             *scanner,
   fprintf (stdout, "%s:%d: ", scanner->input_name, scanner->line);
   if (is_error)
     fprintf (stdout, "error: ");
-  fprintf (stdout, "%s", message);
+  fprintf (stdout, "%s\n", message);
 }
 
 void
@@ -389,6 +389,39 @@ g_scanner_lookup_symbol (GScanner  *scanner,
     return NULL;
 }
 
+static void
+g_scanner_foreach_internal (gpointer  key,
+                           gpointer  value,
+                           gpointer  user_data)
+{
+  register GScannerHashVal *hash_val;
+  register GHFunc func;
+  register gpointer func_data;
+  register gpointer *d;
+
+  d = user_data;
+  func = d[0];
+  func_data = d[1];
+  hash_val = value;
+
+  func (key, hash_val->value, func_data);
+}
+
+void
+g_scanner_foreach_symbol (GScanner       *scanner,
+                         GHFunc          func,
+                         gpointer        func_data)
+{
+  gpointer d[2];
+
+  g_return_if_fail (scanner != NULL);
+
+  d[0] = func;
+  d[1] = func_data;
+
+  g_hash_table_foreach (scanner->symbol_table, g_scanner_foreach_internal, d);
+}
+
 void
 g_scanner_remove_symbol (GScanner      *scanner,
                         const gchar    *symbol)
@@ -867,7 +900,7 @@ g_scanner_stat_mode (const gchar *filename)
 
   stat_buf = g_new0 (struct stat, 1);
 
-  stat (filename, stat_buf);
+  lstat (filename, stat_buf);
 
   st_mode = stat_buf->st_mode;
 
index 7e7b25e2b97f5a714636e67a7064e6c97b4b29f5..63aaa120077670da76661720fb50595a26355ff7 100644 (file)
@@ -668,11 +668,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                    gtk_widget_marshal_signal_4,
                    GTK_TYPE_BOOL, 1,
                    GTK_TYPE_GDK_EVENT);
-  widget_signals[OTHER_EVENT] =
-    gtk_signal_new ("other_event",
+  widget_signals[VISIBILITY_NOTIFY_EVENT] =
+    gtk_signal_new ("visibility_notify_event",
                    GTK_RUN_LAST,
                    object_class->type,
-                   GTK_SIGNAL_OFFSET (GtkWidgetClass, other_event),
+                   GTK_SIGNAL_OFFSET (GtkWidgetClass, visibility_notify_event),
                    gtk_widget_marshal_signal_4,
                    GTK_TYPE_BOOL, 1,
                    GTK_TYPE_GDK_EVENT);
@@ -692,13 +692,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                    gtk_widget_marshal_signal_4,
                    GTK_TYPE_BOOL, 1,
                    GTK_TYPE_GDK_EVENT);
-  widget_signals[VISIBILITY_NOTIFY_EVENT] =
-    gtk_signal_new ("visibility_notify_event",
+  widget_signals[OTHER_EVENT] =
+    gtk_signal_new ("other_event",
                    GTK_RUN_LAST,
                    object_class->type,
-                   GTK_SIGNAL_OFFSET (GtkWidgetClass, visibility_notify_event),
-                   gtk_widget_marshal_signal_1,
-                   GTK_TYPE_NONE, 1,
+                   GTK_SIGNAL_OFFSET (GtkWidgetClass, other_event),
+                   gtk_widget_marshal_signal_4,
+                   GTK_TYPE_BOOL, 1,
                    GTK_TYPE_GDK_EVENT);
 
   gtk_object_class_add_signals (object_class, widget_signals, LAST_SIGNAL);
index e979b78d9eb1e821161bba86f6a22c47d3dceb5a..2cfeef874c1451d3e35c3252d54af334b1e05781 100644 (file)
@@ -321,21 +321,20 @@ struct _GtkWidgetClass
                                    GdkEventDropEnter  *event);
   gint (* drop_leave_event)       (GtkWidget          *widget,
                                    GdkEventDropLeave  *event);
-  gint (* drop_data_available_event)   (GtkWidget        *widget,
-                                       GdkEventDropDataAvailable *event);
+  gint (* drop_data_available_event)(GtkWidget        *widget,
+                                    GdkEventDropDataAvailable *event);
+  gint (* visibility_notify_event)  (GtkWidget        *widget,
+                                    GdkEventVisibility *event);
+  gint (* client_event)                   (GtkWidget          *widget,
+                                   GdkEventClient     *event);
+  gint (* no_expose_event)        (GtkWidget          *widget,
+                                   GdkEventAny        *event);
   gint (* other_event)            (GtkWidget          *widget,
                                    GdkEventOther      *event);
   
   /* selection */
   void (* selection_received)  (GtkWidget      *widget,
                                GtkSelectionData *selection_data);
-  
-  gint (* client_event)                   (GtkWidget          *widget,
-                                   GdkEventClient     *event);
-  gint (* no_expose_event)        (GtkWidget          *widget,
-                                   GdkEventAny        *event);
-  void (* visibility_notify_event) (GtkWidget         *widget,
-                                   GdkEventVisibility *event);
 };
 
 struct _GtkWidgetAuxInfo